import java.util.Scanner;
public class 斐波那契数列 {
    public static void main(String[] args) {
        int a = 1;
        int b = 1;
        Scanner SC =  new Scanner(System.in);
        int n = SC.nextInt();
        for(int i = 2;i<n;i++){
            a = a + b;
            int tem = a;
            a = b;
            b = tem;

        };

        System.out.println(b);





    }
}
